<?php
// +----------------------------------------------------------------------
// | [ DO WHAT YOU LOVE AND FUCK THE REST ]
// +----------------------------------------------------------------------
// | Author < 931274989@qq.com >
// +----------------------------------------------------------------------
// | Explain API 验证基类
// +----------------------------------------------------------------------
namespace app\index\validate;

use think\Validate;

class BaseValidate extends Validate
{
  //获取http传入的参数、对参数做检验
  public function goCheck()
  {
    $params = request()->param();
    $result = $this->check($params);
    if (!$result) {
      return error($this->getError());
    }
    else {
      return true;
    }
  }

}
?>